import { Commit } from "vuex";

interface IClass {
  id: number;
  data: string;
  path: string;
}
interface IState {
  class: IClass[];
  banner: IBanner[];
  action: IAction[];
  snap: ISnap[];
  favLogo: string;
  fav: IFav[];
  ddq: IDdq[];
  sale: ISale;
  coupon: ICoupon;
  find: IFind[];
  good: IGood[];
}
interface IGood {
  goodsId: string;
  id: number;
  pic: string;
  quanJine: number;
  title: string;
  tmall: number;
  xiaoliang: number;
  yongjin: number;
  yuanjia: number;
  fashionTag: string;
  jiage: number;
  thirtySellNun: number;
  labelOne: string;
  comments: string;
  beforeTitleLables: ILables[];
  underPriceLabels: ILabels[];
  beforePriceLabelType: number;
  fanli: number;
  dtitle: string;
  comment: number;
}
interface IFind {
  createTime: string;
  goodId: string;
  huodongType: number;
  hzQuanOver: number;
  id: number;
  pic: string;
  quanId: string;
  quanJine: number;
  salesNum: number;
  startTime: string;
  title: string;
  tmall: number;
  video: number;
  xiaoliang: number;
  yongjin: number;
  yuanjia: number;
  fashionTag: string;
  jiage: number;
  basePriceText: string;
  basePrice: string;
  baseSaleNumText: string;
  thirtySellNun: number;
  promotion: string;
  labelOne?: string;
  labelTwo?: string;
  comments: string;
  beforeTitleLables: ILables[];
  beforePriceLabelType: number;
  underPriceLabels: ILabels[];
  renqi: number;
  specialContent: string;
  specialLabel: [string];
  _id: string;
  category_id: string;
  dtitle: number;
  lowest: number;
  quanMLink: string;
  comment: number;
  quan_num: number;
  quan_time: string;
  is_delete: number;
  is_online: number;
  market_group: [];
}
interface ILabels {
  type: string;
  val: string;
}
interface ILables {
  img: string;
  width: number;
  height: number;
}
interface ICoupon {
  total_quan_over: {
    now_time: string;
    now_num: number;
    pre_time: string;
    pre_num: number;
  };
  choose: {
    obj: {
      title: string;
      px: string;
      pxType: string;
      blackId: string;
    };
  };
  list: IList[];
}
interface IList {
  id: number;
  isDelete: boolean;
  isOnline: boolean;
  couponNum: number;
  coupoTime: string;
  pic: string;
  salesNum: number;
  couponOver: number;
  originPrice: number;
  couponPrice: number;
  price: number;
  status: boolean;
  showLabel: string;
  showLabelDown: string;
  mold: number;
  dtitle: string;
}
interface ISale {
  basic: {
    moduleVisible: string;
  };
  css: {
    layout: number;
  };
  reports: IReports[];
  newGoodsCountOfToday: number;
  barandDTOS: IBarandDTOS[];
}
interface IBarandDTOS {
  maxQuanJia: number;
  discount: number;
  jumpType: string;
  mjumpHref: string;
  todayNewGoodsNum: number;
  profitSwith: number;
  selfProfit: number;
  brandLabelOne: {
    val: string;
  };
  fansNum: number;
  longProfit: string;
  startTime: string;
  endTime: string;
  startNumTime: number;
  endNumTime: number;
  brandId: number;
  brandName: string;
  label: string;
  brandLogo: string;
  backgroundImg: string;
  recentSale: number;
  hotPush: IHotPush[];
}
interface IHotPush {
  brandId: number;
  fresh: number;
  lowest: string;
  sellerId: string;
  sort: number;
  salesTwentyFour: number;
  salesOneHour: number;
  discount: number;
  marketIds: string;
  thirtySellNum: number;
  reachPrice: number;
  flagshipStore: number;
  huodongType: number;
  id: number;
  pic: string;
  xiaoliang: number;
  xiaoliangText: string;
  yuanjia: number;
  quanjine: number;
  jiage: number;
  sellDear: string;
  goodsLabels: IGoodsLabels[];
  market_group: [];
}
interface IGoodsLabels {
  val: string;
}
interface IReports {
  label: string;
  brandId: number;
  typeId: number;
}
interface IDdq {
  time: number;
  status: number;
  hasOver: number;
  timeDesc: string;
  ddqGoodsList: IDdqGoodsList[];
}
interface IDdqGoodsList {
  top: number;
  scheduling: string;
  newWords: string;
  icon: number;
  ddq: number;
  recommend: number;
  host: number;
  lastNum: number;
  latelyNum: number;
  did: number;
  activeType: number;
  couponTime: string;
  id: string;
  pic: string;
  orginPrice: number;
  couponPrice: number;
  salesNum: number;
  couponNum: number;
  price: number;
  couponOver: number;
  label: string;
  istmall: number;
  sellerId: string;
  sellnum: number;
  historyMinPriceDay: number;
  showSaleNum: number;
  isHaitao: number;
  tubiao: string;
  dtitle: string;
}
interface IFav {
  picType: string;
  img: string;
  tag: string;
  tagStyle: string;
  name: string;
  mold: string;
  choose: {
    obj: {
      title: string;
      px: string;
      pxtType: string;
      blackId: string;
    };
    choose_1: string;
    choose_2: string;
  };
  jumpUrl: string;
  dtag: [];
}
interface ISnap {
  width: string;
  name: string;
  height: string;
  choose: {
    obj: {
      title: string;
      px: string;
      pxType: string;
      blackId: string;
    };
    choose_1: string;
    choose_2: string;
  };
  address: string;
  chooseTitle: string;
  chooseSortBy: string;
  chooseBlackListId: string;
  style: string;
  styleId: string;
  jumpUrl: string;
}
interface IChoose {
  choose_1: string;
  choose_2: string;
  show_word: string;
}
interface IBanner {
  id: number;
  name: string;
  pic: string;
  width: number;
  height: number;
  bkPic: string;
  bkColor: string;
  tbPic: string;
  tbTitle: string;
  source: string;
  choose: IChoose[];
  type: number;
  bannerColor: string;
  jumpUrl: string;
}
interface IGetSnap {
  type: string;
  payload: ISnap[];
}
interface IGetBanner {
  type: string;
  payload: IBanner[];
}
interface IGetAction {
  type: string;
  payload: IAction[];
}
interface IAction {
  bannerImgUrl: string;
  jumpUrl: string;
  choose: {
    obj: {
      title: string;
      px: string;
      pxType: string;
      backId: string;
    };
    choose_1: string;
    choose_2: string;
    choose_3: string;
  };
}
interface IGetFav {
  type: string;
  payload: {
    logo: string;
    fav: IFav[];
  };
}
interface IGetDdq {
  type: string;
  payload: IDdq[];
}
interface IGetSale {
  type: string;
  payload: ISale;
}
interface IGetCoupon {
  type: string;
  payload: ICoupon;
}
interface IGetFind {
  type: string;
  payload: IFind[];
}
interface IGetGood {
  type: string;
  payload: IGood[];
}
interface IHome {
  namespaced: boolean;
  state: IState;
  actions: {
    getsnap: ({ commit }: { commit: Commit }) => void;
    getbanner: ({ commit }: { commit: Commit }) => void;
    getaction: ({ commit }: { commit: Commit }) => void;
    getfav: ({ commit }: { commit: Commit }) => void;
    getddq: ({ commit }: { commit: Commit }) => void;
    getsale: ({ commit }: { commit: Commit }) => void;
    getcoupon: ({ commit }: { commit: Commit }) => void;
    getfind: (
      { commit }: { commit: Commit },
      { page }: { page: number }
    ) => void;
    getgood: ({ commit }: { commit: Commit }) => void;
  };
  mutations: {
    GETSNAP: (state: IState, action: IGetSnap) => void;
    GETBANNER: (state: IState, action: IGetBanner) => void;
    GETACTION: (state: IState, action: IGetAction) => void;
    GETFAV: (state: IState, action: IGetFav) => void;
    GETDDQ: (state: IState, action: IGetDdq) => void;
    GETSALE: (state: IState, action: IGetSale) => void;
    GETCOUPON: (state: IState, action: IGetCoupon) => void;
    GETFIND: (state: IState, action: IGetFind) => void;
    GETGOOD: (state: IState, action: IGetGood) => void;
  };
}
export {
  IHome,
  ICoupon,
  IGetCoupon,
  IState,
  IGetSale,
  ISale,
  IGetSnap,
  IGetDdq,
  IDdq,
  IClass,
  ISnap,
  IBanner,
  IGetFav,
  IGetBanner,
  IFav,
  IGetAction,
  IAction,
  IFind,
  IGetFind,
  IGood,
  IGetGood,
};
